class Student(object):
    count = 0

    def __init__(self, name):
        self.name = name
        self.id = Student.count
        Student.count = self.id + 1

    def printId(self):
        print(self.name)


zhangsan = Student('zhangsan')
print(zhangsan.id)
lisi = Student('lisi')
print(lisi.id)
mazi = Student('mazi')
print(mazi.id)
